/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package LiveReservations.control.mocks;

import java.util.ArrayList;
import java.util.List;
import LiveReservations.control.info.ReservationInfo;

/**
 *
 * @author grigo_000
 */
public class ReservationBookMock {

    private final List<ReservationInfo> reservations;

    public ReservationBookMock() {
        this.reservations = new ArrayList<>();
    }
    
    public boolean submitReservation(ReservationInfo resInfo) {   
        if( resInfo.getStore().getSeatStatus().reserve(resInfo.getSeats()) )
        {
            return this.reservations.add(resInfo);
        }
        else
        {
            return false;
        }
    }
}
